
import React, { Component } from 'react';
import { StyleSheet, View, PropTypes } from 'react-native';
import QRNCode from 'react-native-qrcode';

class MyQRCode extends Component {
    static propTypes = {
        text:PropTypes.string
    }

    render() {
        return (
            <View>
                <QRNCode
                    value={this.props.text}
                    size={240}
                />
            </View>
        );
    }
}

const styles = StyleSheet.create({
    containerScrollView: {
        flex:1,
        backgroundColor: '#F5FCFF'
    },
    container: {
        flex:1,
        margin:20,
        alignItems: 'center',
        justifyContent: 'flex-end'
    },
    qrContainer: {
        alignItems: 'center',
        justifyContent: 'center'
    },
    input: {
        height: 40,
        borderColor: 'gray',
        borderWidth: 1,
        margin: 10,
        borderRadius: 5,
        padding: 5,
    },
    number: {
        fontSize: 14,
        textAlign: 'center',
        color: '#9b9b9b',
        marginTop:20,
    },
    message: {
        fontSize: 16,
        textAlign: 'center',
        color: '#4A4A4A',
        marginTop:80,
    },
    centerImg: {
        margin:20,
        width:40,
        height:30,
    }
});

export default MyQRCode;
